package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.query.TravelQueryObject;
import cn.wolfcode.trip.base.query.landmarkDetailQueryObject;
import cn.wolfcode.trip.base.service.ILandmarkDetaiService;
import cn.wolfcode.trip.base.service.ILtCatalogDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("landmarkContentDetail")
public class LmContentDetailController {
    @Autowired
    private ILandmarkDetaiService landmarkDetaiService;
    @Autowired
    private ILtCatalogDetailService iLtCatalogDetailService;

    //推荐下
    // 1.折扣相关景点门票
    @GetMapping("/{id}/detail")
    public Object getLmContentDetailById(@PathVariable long id){
        return landmarkDetaiService.get(id);
    }
    //2.景点详情
    @GetMapping("/{id}/content")
    public Object getLmContentById(@PathVariable long id){
        return landmarkDetaiService.getContentById(id);
    }
    //推荐主题
    //1.主题下所有景点
    @GetMapping("/{icdId}/all")
    public Object getDetailsByIcdId(@PathVariable int icdId,landmarkDetailQueryObject qo){
        qo.setIcdId(icdId);
        return landmarkDetaiService.getDetailsByIcdId(qo);
    }

    //分类的相关页面
    //.本类的图片以及名字
    //查询单个主题
    @GetMapping("/{icdId}/title")
    public Object getTitleByIcdId(@PathVariable long icdId){
        return iLtCatalogDetailService.get(icdId);
    }
}
